Skip to content

Fix egui web UI: add styling configuration and build documentation#49

Merged
yiwang merged 3 commits into
mainfrom
copilot/poc-egui-web-ui
Feb 19, 2026
Merged

Fix egui web UI: add styling configuration and build documentation#49
yiwang merged 3 commits into
mainfrom
copilot/poc-egui-web-ui

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 19, 2026

The egui web UI at /egui rendered blank due to missing WASM artifacts and lacking visual style initialization.

Changes

  • crates/server/src/web/app.rs: Added configure_style() to initialize dark theme, text sizes (14px/20px), and rounded corners matching desktop implementation
  • crates/server/ui/egui/README.md: Documented build process, architecture, and code reuse patterns
  • build-egui-web.sh: Clarified build instructions

Implementation

fn configure_style(ctx: &egui::Context) {
    ctx.set_visuals(egui::Visuals::dark());
    
    let mut style = (*ctx.style()).clone();
    style.text_styles.insert(
        egui::TextStyle::Body,
        egui::FontId::new(14.0, egui::FontFamily::Proportional),
    );
    // ... rounded corners, etc.
    ctx.set_style(style);
}

Build & Usage

./build-egui-web.sh                # Compiles to WASM (~1.3 MB) + JS bindings (76 KB)
cargo run -- daemon start          # Serves at :31327
# Navigate to http://localhost:31327/egui

The PoC demonstrates egui code reuse between native desktop and WASM web with minimal platform-specific adjustments. Current implementation shows mock chat interface; backend integration remains future work.

Notes

WASM artifacts are gitignored and must be built locally. The web UI structure mirrors the desktop DesktopApp for consistency.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.pyke.io
    • Triggering command: /home/REDACTED/work/localgpt/localgpt/target/release/build/ort-sys-61c34fc4fbd5ab68/build-script-main /home/REDACTED/work/localgpt/localgpt/target/release/build/ort-sys-61c34fc4fbd5ab68/build-script-main -o /home/REDACTED/work/localgpt/localgpt/target/release/build/zstd-sys-f93b6ddebfd872codegen-units=1 /tmp/ccjnFSkc.s s-db�� e6/out/libzstd.a e6/out/44ff4c55aa9e5133-debug.o e6/out/44ff4c55aa9e5133-entropy_common.o e6/out/44ff4c55aa9e5133-error_private.o e6/out/44ff4c55aa9e5133-fse_decompress.o e6/out/44ff4c55aa9e5133-pool.o e6/out/44ff4c55aa9e5133-threading.o e6/out/44ff4c55aa9e5133-zstd_common.o e6/out/fb80479a5fb81f6a-fse_compress.o e6/out/fb80479a5fb81f6a-hist.o e6/out/fb80479a5fb81f6a-huf_compress.o e6/out/fb80479a5fb81f6a-zstd_compress.o e6/out/fb80479a5fb81f6a-zstd_compress_literals.o e6/out/fb80479a5fb81f6a-zstd_compress_sequences.o e6/out/fb80479a5fb81f6a-zstd_compress_superblock.o (dns block)
    • Triggering command: /home/REDACTED/work/localgpt/localgpt/target/release/build/ort-sys-61c34fc4fbd5ab68/build-script-main /home/REDACTED/work/localgpt/localgpt/target/release/build/ort-sys-61c34fc4fbd5ab68/build-script-main -Wl,-Bstatic /home/REDACTED/work/localgpt/localgpt/target/release/deps/libdarling_core-a54c537428884749.rlib /home/REDACTED/work/localgpt/localgpt/target/release/deps/libstrsim-03f22d1cc77ed67f.rlib /home/REDACTED/work/localgpt/localgpt/target/release/deps/libfnv-dc6cec6a43a4b5b7.rlib /home/REDACTED/work/localgpt/localgpt/target/release/deps/libident_case-400265eedfb26383.rlib /home/REDACTED/work/localgpt/localgpt/target/release/deps/libsyn-182291cdcb9066b8.rlib /home/REDACTED/work/localgpt/localgpt/target/release/deps/libquote-d141ceb6e1fa082f.rlib d528729519cc7.derive_builder_macro.6e29ab9f5177fff7-cgu.0.rcgu.o /home/REDACTED/work/localgpt/localgpt/target/release/deps/libunicode_ident-55c225894ee�� d528729519cc7.d9574sksdu1uyvff6ov1sf9pz.rcgu.o /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_64-REDACTED-linux-gnu/lib/librustc_literal_escaper-f22bf791d1c2fd7e.rlib gver�� 0a12c71e5b08b71.rlib 7d2.rlib 64685741.rlib 7f.rlib rlib b26383.rlib rlib (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>PoC Egui as internal web UI, reuse Desktop Egui code as much as possible</issue_title>
<issue_description>Currently it's html, css and js embedded server. PoC if egui codebase can do both for desktop and web with code reuse.</issue_description>

<agent_instructions>this seems not working as the webpage is blank when open</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@yiwang @Ax73 if you want give this a try? @yiwang seems still not working

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 19, 2026 07:39
Co-authored-by: yiwang <142937+yiwang@users.noreply.github.com>
Co-authored-by: yiwang <142937+yiwang@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement PoC for Egui as internal web UI Fix egui web UI: add styling configuration and build documentation Feb 19, 2026
Copilot AI requested a review from yiwang February 19, 2026 07:42
@yiwang yiwang marked this pull request as ready for review February 19, 2026 07:58
@yiwang yiwang merged commit 6cf361d into main Feb 19, 2026
5 checks passed
@yiwang yiwang deleted the copilot/poc-egui-web-ui branch February 19, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PoC Egui as internal web UI, reuse Desktop Egui code as much as possible

2 participants